<?php
$dir = FILE_ROOT.'themes/default/javascript/weather.js';
switch($do)
{
    case "weather":
        $iswrite = false;
        if(file_exists($dir)) {
            $lastupdate = filemtime($dir);
            if(time()-$lastupdate>3600*5) {
                $iswrite = true;
            }
        }
        else{
            $iswrite = true;
        }
        if($iswrite) {
            WriteJsWeatherCache($CONFIGURE["weathercityno"]);
        }
        exit("true");
    break;
}
?>